<%- include ../include/header.ejs%>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-2">
            <%- include ../include/left.ejs%>          
        </div>
        <div class="col-sm-10">
            <ol class="breadcrumb">
                <li class="active">商品管理 </li>
                <li class="active">商品列表 </li>
            </ol>
            <div class="panel panel-default">              
			    <div class="panel-heading">编辑商品 </div>
                <div class="panel-body">
                    <div class="table-responsive input-form">
                        <form action="/admin/doEdit" method="post" enctype="multipart/form-data">
                            <ul>
                                <input type="text" name="_id" value="<%= item.id %>" hidden="hidden" />
                                <li>商品名称：<input type="text" name="title" value="<%= item.name %>"/></li>
								<li>商品类别：<select name="cat_id" id="">
                                	<option value="1" <%= (item.cat_id==1)?'selected':'' %>>汽车配件</option>
                                	<option value="2" <%= (item.cat_id==2)?'selected':'' %>>轮船配件</option>
                                	<option value="3" <%= (item.cat_id==3)?'selected':'' %>>数码产品</option>
                                	<option value="4" <%= (item.cat_id==4)?'selected':'' %>>家居用品</option>
                                    </select>
                                </li> 
                                <li>  商品图片：<input type="file" name="pic"/>
                                    </br>
                                    <img src="/<%= item.image %>" width="100px" height="100px"/>
                                </li>
                                <li>商品价格：<input type="text" name="price" value="<%= item.price %>"/></li>
                                <li>关键字：&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="keywords" value="<%= item.keywords %>" /></li>
                                <li>商品描述：<textarea name="description" id="" cols="60" rows="8"><%= item.content %></textarea></li>
                                <li><br/>
                                    <button type="submit" class="btn btn-success">提交</button>
                                </li>
                          </ul>
                        </form>
                    </div>
                </div>
           </div>
        </div>
    </div>
</div>
</body>
</html>